<!DOCTYPE html>
<html>
<head>
    <title>节点服务器管理</title>
		<#include "/header.html">
</head>

<style>
    .ui-jqgrid .ui-jqgrid-htable .ui-th-div{ font-size: 14px!important; font-weight: normal!important; color: #333}
    .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td{ font-size: 14px!important; font-weight: normal!important; color: #333}
</style>
<body>
<div id="rrapp" v-cloak>
<!--	<div style="width: 100%; margin-bottom: 25px;">-->
<!--		<div class="form-group col-sm-2" style="padding: 0!important;"><input type="text" placeholder="节点名称" class="form-control"></div>-->
<!--		<a class="btn btn-default" style="margin-left: 10px;">查询</a>-->
<!--		<a class="btn btn-default" style="margin-left: 10px;">清空</a>-->
<!--	</div>-->

    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <input type="text" class="form-control" v-model="q.name" @keyup.enter="query" placeholder="节点名称、ip地址、端口号、账号">
            </div>
            <a class="btn btn-default" @click="query">查询</a>
			<#if shiro.hasPermission("file:servernode:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("file:servernode:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("file:servernode:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-2 control-label">节点名称</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="serverNode.name" placeholder="节点名称"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">节点ip地址</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="serverNode.ip" placeholder="节点ip地址"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">节点端口号</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="serverNode.port" placeholder="节点端口号"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">登录账号</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="serverNode.user" placeholder="登录账号"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">登录密码</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="serverNode.password" placeholder="登录密码"/>
            </div>
        </div>
        <!--											                    <div class="form-group">-->
        <!--                        <div class="col-sm-2 control-label">创建时间</div>-->
        <!--                        <div class="col-sm-10">-->
        <!--                            <input type="text" class="form-control" id="createTime" readonly="readonly" v-model="serverNode.createTime" placeholder="创建时间"/>-->
        <!--                        </div>-->
        <!--                    </div>-->
        <!--											                    <div class="form-group">-->
        <!--                        <div class="col-sm-2 control-label">更新时间</div>-->
        <!--                        <div class="col-sm-10">-->
        <!--                            <input type="text" class="form-control" id="updateTime" readonly="readonly" placeholder="更新时间"/>-->
        <!--                        </div>-->
        <!--                    </div>-->

        <div class="form-group">
            <div class="col-sm-2 control-label">本地保存路径</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="serverNode.savePach" placeholder="本地保存路径"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">描述信息</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="serverNode.desc" placeholder="描述信息"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">创建人id</div>
            <div class="col-sm-10">
                <input type="text" class="form-control" v-model="serverNode.createUserId" placeholder="创建人id"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..."
                   @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
        </div>
    </form>
</div>
</div>
<script>
    $('#createTime').dcalendarpicker({
        format: 'yyyy-mm-dd'
    });
    $('#updateTime').dcalendarpicker({
        format: 'yyyy-mm-dd'
    });
</script>
<script src="${request.contextPath}/statics/js/modules/file/servernode.js?_${.now?long}"></script>
</body>
</html>